package com.dragon.modules.yuegou.query.member;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.member.MemberCardLevelEntity;
import com.dragon.modules.yuegou.enums.member.MemberCardLevelGradeRule;
import com.dragon.modules.yuegou.enums.member.MemberCardLevelLevelSorce;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 会员卡等级表 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2022-03-02 15:16:46
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class MemberCardLevelQuery extends MemberCardLevelEntity implements Query<MemberCardLevelEntity> {

	private static final long serialVersionUID = 1L;


    /** 主键查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 商圈ID查询条件 */
	@JsonUnwrapped(prefix = "busdId")
	private Condition<String> busdIdCondition;

    /** 会员ID查询条件 */
	@JsonUnwrapped(prefix = "memberId")
	private Condition<String> memberIdCondition;

    /** 会员卡编号查询条件 */
	@JsonUnwrapped(prefix = "cardNo")
	private Condition<String> cardNoCondition;

    /** [枚举]等级规则：0-成长值-GROWTH、1-指定条件-SPECIFIED查询条件 */
	@JsonUnwrapped(prefix = "gradeRule")
	private Condition<MemberCardLevelGradeRule> gradeRuleCondition;

    /** 当前会员等级ID查询条件 */
	@JsonUnwrapped(prefix = "gradeId")
	private Condition<String> gradeIdCondition;

    /** 会员等级名称查询条件 */
	@JsonUnwrapped(prefix = "gradeName")
	private Condition<String> gradeNameCondition;

    /** 当前会员成长值查询条件 */
	@JsonUnwrapped(prefix = "growCount")
	private Condition<Long> growCountCondition;

    /** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 修改时间查询条件 */
	@JsonUnwrapped(prefix = "modifiedTime")
	private Condition<LocalDateTime> modifiedTimeCondition;

    /** 等级开始时间查询条件 */
	@JsonUnwrapped(prefix = "beginTime")
	private Condition<LocalDateTime> beginTimeCondition;

    /** 等级结束时间查询条件 */
	@JsonUnwrapped(prefix = "endTime")
	private Condition<LocalDateTime> endTimeCondition;

    /** [枚举]等级来源：0-创建会员-VIP_CREATE、1-会员升级-VIP_UPGRADE、2-会员降级-VIP_DEMOTION、3-旧会员变更-OLD_MEMBER查询条件 */
	@JsonUnwrapped(prefix = "levelSorce")
	private Condition<MemberCardLevelLevelSorce> levelSorceCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public MemberCardLevelQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public MemberCardLevelQuery(MemberCardLevelEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public MemberCardLevelQuery(MemberCardLevelQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.busdIdCondition != null) {
			this.busdIdCondition = other.busdIdCondition.copy();
		}
		if(other.memberIdCondition != null) {
			this.memberIdCondition = other.memberIdCondition.copy();
		}
		if(other.cardNoCondition != null) {
			this.cardNoCondition = other.cardNoCondition.copy();
		}
		if(other.gradeRuleCondition != null) {
			this.gradeRuleCondition = other.gradeRuleCondition.copy();
		}
		if(other.gradeIdCondition != null) {
			this.gradeIdCondition = other.gradeIdCondition.copy();
		}
		if(other.gradeNameCondition != null) {
			this.gradeNameCondition = other.gradeNameCondition.copy();
		}
		if(other.growCountCondition != null) {
			this.growCountCondition = other.growCountCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.modifiedTimeCondition != null) {
			this.modifiedTimeCondition = other.modifiedTimeCondition.copy();
		}
		if(other.beginTimeCondition != null) {
			this.beginTimeCondition = other.beginTimeCondition.copy();
		}
		if(other.endTimeCondition != null) {
			this.endTimeCondition = other.endTimeCondition.copy();
		}
		if(other.levelSorceCondition != null) {
			this.levelSorceCondition = other.levelSorceCondition.copy();
		}
	}

	@Override
	public QueryWrapper<MemberCardLevelEntity> toQueryWrapper() {
		QueryWrapper<MemberCardLevelEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (busdIdCondition != null) {
			busdIdCondition.toWrapper(wrapper, COL_BUSD_ID);
		}
		if (memberIdCondition != null) {
			memberIdCondition.toWrapper(wrapper, COL_MEMBER_ID);
		}
		if (cardNoCondition != null) {
			cardNoCondition.toWrapper(wrapper, COL_CARD_NO);
		}
		if (gradeRuleCondition != null) {
			gradeRuleCondition.toWrapper(wrapper, COL_GRADE_RULE);
		}
		if (gradeIdCondition != null) {
			gradeIdCondition.toWrapper(wrapper, COL_GRADE_ID);
		}
		if (gradeNameCondition != null) {
			gradeNameCondition.toWrapper(wrapper, COL_GRADE_NAME);
		}
		if (growCountCondition != null) {
			growCountCondition.toWrapper(wrapper, COL_GROW_COUNT);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (modifiedTimeCondition != null) {
			modifiedTimeCondition.toWrapper(wrapper, COL_MODIFIED_TIME);
		}
		if (beginTimeCondition != null) {
			beginTimeCondition.toWrapper(wrapper, COL_BEGIN_TIME);
		}
		if (endTimeCondition != null) {
			endTimeCondition.toWrapper(wrapper, COL_END_TIME);
		}
		if (levelSorceCondition != null) {
			levelSorceCondition.toWrapper(wrapper, COL_LEVEL_SORCE);
		}
		return wrapper;
	}

	/**
	 * 构造并返回主键查询条件
	 * 
	 * @return idCondition 主键查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取主键查询条件
	 * 
	 * @return idCondition 主键查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置主键查询条件
	 * 
	 * @param idCondition 主键查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回商圈ID查询条件
	 * 
	 * @return busdIdCondition 商圈ID查询条件
	 */
	public Condition<String> busdId() {
		this.busdIdCondition = new Condition<>();
		return this.busdIdCondition;
	}
	
	/**
	 * 获取商圈ID查询条件
	 * 
	 * @return busdIdCondition 商圈ID查询条件
	 */
	public Condition<String> getBusdIdCondition() {
		return busdIdCondition;
	}

	/**
	 * 设置商圈ID查询条件
	 * 
	 * @param busdIdCondition 商圈ID查询条件
	 */
	public void setBusdIdCondition(Condition<String> busdIdCondition) {
		this.busdIdCondition = busdIdCondition;
	}

	/**
	 * 构造并返回会员ID查询条件
	 * 
	 * @return memberIdCondition 会员ID查询条件
	 */
	public Condition<String> memberId() {
		this.memberIdCondition = new Condition<>();
		return this.memberIdCondition;
	}
	
	/**
	 * 获取会员ID查询条件
	 * 
	 * @return memberIdCondition 会员ID查询条件
	 */
	public Condition<String> getMemberIdCondition() {
		return memberIdCondition;
	}

	/**
	 * 设置会员ID查询条件
	 * 
	 * @param memberIdCondition 会员ID查询条件
	 */
	public void setMemberIdCondition(Condition<String> memberIdCondition) {
		this.memberIdCondition = memberIdCondition;
	}

	/**
	 * 构造并返回会员卡编号查询条件
	 * 
	 * @return cardNoCondition 会员卡编号查询条件
	 */
	public Condition<String> cardNo() {
		this.cardNoCondition = new Condition<>();
		return this.cardNoCondition;
	}
	
	/**
	 * 获取会员卡编号查询条件
	 * 
	 * @return cardNoCondition 会员卡编号查询条件
	 */
	public Condition<String> getCardNoCondition() {
		return cardNoCondition;
	}

	/**
	 * 设置会员卡编号查询条件
	 * 
	 * @param cardNoCondition 会员卡编号查询条件
	 */
	public void setCardNoCondition(Condition<String> cardNoCondition) {
		this.cardNoCondition = cardNoCondition;
	}

	/**
	 * 构造并返回[枚举]等级规则：0-成长值-GROWTH、1-指定条件-SPECIFIED查询条件
	 * 
	 * @return gradeRuleCondition [枚举]等级规则：0-成长值-GROWTH、1-指定条件-SPECIFIED查询条件
	 */
	public Condition<MemberCardLevelGradeRule> gradeRule() {
		this.gradeRuleCondition = new Condition<>();
		return this.gradeRuleCondition;
	}
	
	/**
	 * 获取[枚举]等级规则：0-成长值-GROWTH、1-指定条件-SPECIFIED查询条件
	 * 
	 * @return gradeRuleCondition [枚举]等级规则：0-成长值-GROWTH、1-指定条件-SPECIFIED查询条件
	 */
	public Condition<MemberCardLevelGradeRule> getGradeRuleCondition() {
		return gradeRuleCondition;
	}

	/**
	 * 设置[枚举]等级规则：0-成长值-GROWTH、1-指定条件-SPECIFIED查询条件
	 * 
	 * @param gradeRuleCondition [枚举]等级规则：0-成长值-GROWTH、1-指定条件-SPECIFIED查询条件
	 */
	public void setGradeRuleCondition(Condition<MemberCardLevelGradeRule> gradeRuleCondition) {
		this.gradeRuleCondition = gradeRuleCondition;
	}

	/**
	 * 构造并返回当前会员等级ID查询条件
	 * 
	 * @return gradeIdCondition 当前会员等级ID查询条件
	 */
	public Condition<String> gradeId() {
		this.gradeIdCondition = new Condition<>();
		return this.gradeIdCondition;
	}
	
	/**
	 * 获取当前会员等级ID查询条件
	 * 
	 * @return gradeIdCondition 当前会员等级ID查询条件
	 */
	public Condition<String> getGradeIdCondition() {
		return gradeIdCondition;
	}

	/**
	 * 设置当前会员等级ID查询条件
	 * 
	 * @param gradeIdCondition 当前会员等级ID查询条件
	 */
	public void setGradeIdCondition(Condition<String> gradeIdCondition) {
		this.gradeIdCondition = gradeIdCondition;
	}

	/**
	 * 构造并返回会员等级名称查询条件
	 * 
	 * @return gradeNameCondition 会员等级名称查询条件
	 */
	public Condition<String> gradeName() {
		this.gradeNameCondition = new Condition<>();
		return this.gradeNameCondition;
	}
	
	/**
	 * 获取会员等级名称查询条件
	 * 
	 * @return gradeNameCondition 会员等级名称查询条件
	 */
	public Condition<String> getGradeNameCondition() {
		return gradeNameCondition;
	}

	/**
	 * 设置会员等级名称查询条件
	 * 
	 * @param gradeNameCondition 会员等级名称查询条件
	 */
	public void setGradeNameCondition(Condition<String> gradeNameCondition) {
		this.gradeNameCondition = gradeNameCondition;
	}

	/**
	 * 构造并返回当前会员成长值查询条件
	 * 
	 * @return growCountCondition 当前会员成长值查询条件
	 */
	public Condition<Long> growCount() {
		this.growCountCondition = new Condition<>();
		return this.growCountCondition;
	}
	
	/**
	 * 获取当前会员成长值查询条件
	 * 
	 * @return growCountCondition 当前会员成长值查询条件
	 */
	public Condition<Long> getGrowCountCondition() {
		return growCountCondition;
	}

	/**
	 * 设置当前会员成长值查询条件
	 * 
	 * @param growCountCondition 当前会员成长值查询条件
	 */
	public void setGrowCountCondition(Condition<Long> growCountCondition) {
		this.growCountCondition = growCountCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 * 
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回修改时间查询条件
	 * 
	 * @return modifiedTimeCondition 修改时间查询条件
	 */
	public Condition<LocalDateTime> modifiedTime() {
		this.modifiedTimeCondition = new Condition<>();
		return this.modifiedTimeCondition;
	}
	
	/**
	 * 获取修改时间查询条件
	 * 
	 * @return modifiedTimeCondition 修改时间查询条件
	 */
	public Condition<LocalDateTime> getModifiedTimeCondition() {
		return modifiedTimeCondition;
	}

	/**
	 * 设置修改时间查询条件
	 * 
	 * @param modifiedTimeCondition 修改时间查询条件
	 */
	public void setModifiedTimeCondition(Condition<LocalDateTime> modifiedTimeCondition) {
		this.modifiedTimeCondition = modifiedTimeCondition;
	}

	/**
	 * 构造并返回等级开始时间查询条件
	 * 
	 * @return beginTimeCondition 等级开始时间查询条件
	 */
	public Condition<LocalDateTime> beginTime() {
		this.beginTimeCondition = new Condition<>();
		return this.beginTimeCondition;
	}
	
	/**
	 * 获取等级开始时间查询条件
	 * 
	 * @return beginTimeCondition 等级开始时间查询条件
	 */
	public Condition<LocalDateTime> getBeginTimeCondition() {
		return beginTimeCondition;
	}

	/**
	 * 设置等级开始时间查询条件
	 * 
	 * @param beginTimeCondition 等级开始时间查询条件
	 */
	public void setBeginTimeCondition(Condition<LocalDateTime> beginTimeCondition) {
		this.beginTimeCondition = beginTimeCondition;
	}

	/**
	 * 构造并返回等级结束时间查询条件
	 * 
	 * @return endTimeCondition 等级结束时间查询条件
	 */
	public Condition<LocalDateTime> endTime() {
		this.endTimeCondition = new Condition<>();
		return this.endTimeCondition;
	}
	
	/**
	 * 获取等级结束时间查询条件
	 * 
	 * @return endTimeCondition 等级结束时间查询条件
	 */
	public Condition<LocalDateTime> getEndTimeCondition() {
		return endTimeCondition;
	}

	/**
	 * 设置等级结束时间查询条件
	 * 
	 * @param endTimeCondition 等级结束时间查询条件
	 */
	public void setEndTimeCondition(Condition<LocalDateTime> endTimeCondition) {
		this.endTimeCondition = endTimeCondition;
	}

	/**
	 * 构造并返回[枚举]等级来源：0-创建会员-VIP_CREATE、1-会员升级-VIP_UPGRADE、2-会员降级-VIP_DEMOTION、3-旧会员变更-OLD_MEMBER查询条件
	 * 
	 * @return levelSorceCondition [枚举]等级来源：0-创建会员-VIP_CREATE、1-会员升级-VIP_UPGRADE、2-会员降级-VIP_DEMOTION、3-旧会员变更-OLD_MEMBER查询条件
	 */
	public Condition<MemberCardLevelLevelSorce> levelSorce() {
		this.levelSorceCondition = new Condition<>();
		return this.levelSorceCondition;
	}
	
	/**
	 * 获取[枚举]等级来源：0-创建会员-VIP_CREATE、1-会员升级-VIP_UPGRADE、2-会员降级-VIP_DEMOTION、3-旧会员变更-OLD_MEMBER查询条件
	 * 
	 * @return levelSorceCondition [枚举]等级来源：0-创建会员-VIP_CREATE、1-会员升级-VIP_UPGRADE、2-会员降级-VIP_DEMOTION、3-旧会员变更-OLD_MEMBER查询条件
	 */
	public Condition<MemberCardLevelLevelSorce> getLevelSorceCondition() {
		return levelSorceCondition;
	}

	/**
	 * 设置[枚举]等级来源：0-创建会员-VIP_CREATE、1-会员升级-VIP_UPGRADE、2-会员降级-VIP_DEMOTION、3-旧会员变更-OLD_MEMBER查询条件
	 * 
	 * @param levelSorceCondition [枚举]等级来源：0-创建会员-VIP_CREATE、1-会员升级-VIP_UPGRADE、2-会员降级-VIP_DEMOTION、3-旧会员变更-OLD_MEMBER查询条件
	 */
	public void setLevelSorceCondition(Condition<MemberCardLevelLevelSorce> levelSorceCondition) {
		this.levelSorceCondition = levelSorceCondition;
	}

}
